package NC;

public class NC67 {
    public int FindGreatestSumOfSubArray(int[] array) {
        int temp = array[0];
        int ans =array[0];
        for (int i = 1; i < array.length; i++) {
            temp = Math.max(array[i]+temp,array[i]);
            ans = Math.max(ans,temp);
        }
        return ans;

    }
}
